// 360 壁纸api
import 'dart:math';
import 'package:dio/dio.dart';
import 'package:wallpaper/http/dio_instance.dart';

// 4k壁纸
Future<Response> get4kImgs({required int id, required int count}) =>
    DioInstance.instance().get(path: 'http://api.yujn.cn/api/4k.php', param: {
      'count': count,
      'type': 'json',
      'id': id,
      'radom': Random().nextDouble(),
    });

// 获取分类
Future<Response> get360getCategory({required int id, required int count}) =>
    DioInstance.instance()
        .get(path: 'http://wp.birdpaper.com.cn/intf/getCategory');

// 获取分类下的壁纸
Future<Response> get360ImgList(
        {required String cids, required int pageno, required int count}) =>
    DioInstance.instance()
        .get(path: 'http://wp.birdpaper.com.cn/intf/GetListByCategory', param: {
      "cids": cids,
      "pageno": pageno,
      "count": count,
    });

// 最新壁纸
Future<Response> get360NewWallpaper(
        {required int pageno, required int count}) =>
    DioInstance.instance()
        .get(path: 'http://wp.birdpaper.com.cn/intf/newestList', param: {
      "pageno": pageno,
      "count": count,
    });
